package org.infinitest.intellij;

import org.infinitest.testrunner.TestStatusListener;
import org.infinitest.TestEvent;

public class InfinitestTestStatusListener implements TestStatusListener {
  private InfinitestAnnotator annotator;

  public InfinitestTestStatusListener(InfinitestAnnotator annotator) {
    this.annotator = annotator;
  }

  public void testCaseStarting(TestEvent testEvent) {
  }

  public void testMethodFailed(TestEvent testEvent) {
    annotator.annotate(testEvent);
  }

  public void testMethodSucceeded(TestEvent testEvent) {
    annotator.clearAnnotation(testEvent);
  }

  public void testCaseSucceeded(TestEvent testEvent) {
  }

  public void testMethodError(TestEvent testEvent) {
    annotator.annotate(testEvent);
  }
}
